Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> h1 { counter-increment: section; } h1:before { content: "Section " counter(section) " "; } </style> </head> <body> <h1>HTML Tutorial</h1> <h1 id="myH1">CSS Tutorial</h1> <h1>JavaScripts Tutorial</h1> <p>Click the "Try it" button to change the counterIncrement of the second H1 element:</p> <button onclick="myFunction()">Try it</button> <script> function myFunction() { document.getElementById("myH1").style.counterIncrement = "subsection"; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_counterincrement by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:25:20 GMT --> </html>
Result:
Try it Yourself - © w3schools.com